/**
 * The MIT License (MIT)
 * 
 * Copyright (c) 2016 mo_yq5 (mo_yq5@163.com)
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 */
package com.openapi.weixin.pay.unifiedorder;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;

/**
 * 扫码支付－统一下单－响应参数
 * @author Moyq5
 * @since 2016年8月8日
 */
public class WeixinPayUnifiedOrderResponse {

	/**
	 * 返回状态码，SUCCESS/FAIL，此字段是通信标识，非交易标识，交易是否成功需要查看result_code来判断<br>
	 * 必填，最长16，如：SUCCESS
	 */
	@JacksonXmlProperty(localName = "return_code")
	private String returnCode;
	
	/**
	 * 返回信息<br>
	 * 最长128，如：签名失败
	 */
	@JacksonXmlProperty(localName = "return_msg")
	private String returnMsg;
	
	/**
	 * 公众账号ID，调用接口提交的公众账号ID<br>
	 * 必填，最长32，如：wx8888888888888888
	 */
	@JacksonXmlProperty(localName = "appid")
	private String appId;
	
	/**
	 * 商户号，调用接口提交的商户号<br>
	 * 必填，最长32，如：1900000109
	 */
	@JacksonXmlProperty(localName = "mch_id")
	private String mchId;
	
	/**
	 * 子商户公众账号ID，微信分配的子商户公众账号ID<br>
	 * 最长32，如：wx8888888888888888
	 */
	@JacksonXmlProperty(localName = "sub_appid")
	private String subAppId;
	
	/**
	 * 子商户号，微信支付分配的子商户号<br>
	 * 必填，最长32，如：1900000109
	 */
	@JacksonXmlProperty(localName = "sub_mch_id")
	private String subMchId;
	
	/**
	 * 设备号，调用接口提交的终端设备号<br>
	 * 最长32，如：013467007045764
	 */
	@JacksonXmlProperty(localName = "device_info")
	private String deviceInfo;
	
	/**
	 * 随机字符串，微信返回的随机字符串<br>
	 * 必填，最长32，如：5K8264ILTKCH16CQ2502SI8ZNMTM67VS
	 */
	@JacksonXmlProperty(localName = "nonce_str")
	private String nonceStr;
	
	/**
	 * 签名，微信返回的签名<br>
	 * 必填，最长32，如：C380BEC2BFD727A4B6845133519F3AD6
	 */
	private String sign;
	
	/**
	 * 业务结果，SUCCESS/FAIL<br>
	 * 必填，最长16，如：SUCCESS
	 */
	@JacksonXmlProperty(localName = "result_code")
	private String resultCode;
	
	/**
	 * 错误代码，最长16，如：SYSTEMERROR
	 */
	@JacksonXmlProperty(localName = "err_code")
	private String errCode;
	
	/**
	 * 错误代码描述，最长128，如：系统错误
	 */
	@JacksonXmlProperty(localName = "err_code_des")
	private String errCodeDes;
	
	/**
	 * 交易类型，调用接口提交的交易类型，取值如下：JSAPI，NATIVE，APP<br>
	 * 必填，最长16，如：JSAPI
	 */
	@JacksonXmlProperty(localName = "trade_type")
	private String tradeType;
	
	/**
	 * 预支付交易会话标识，微信生成的预支付回话标识，用于后续接口调用中使用，该值有效期为2小时<br>
	 * 必填，最长64，如：wx201410272009395522657a690389285100
	 */
	@JacksonXmlProperty(localName = "prepay_id")
	private String prepayId;
	
	/**
	 * 二维码链接，trade_type为NATIVE是有返回，可将该参数值生成二维码展示出来进行扫码支付<br>
	 * 最长64，如：URl：weixin：//wxpay/s/An4baqw
	 */
	@JacksonXmlProperty(localName = "code_url")
	private String codeUrl;

	/**
	 * @return the returnCode
	 */
	public String getReturnCode() {
		return returnCode;
	}

	/**
	 * @param returnCode the returnCode to set
	 */
	public void setReturnCode(String returnCode) {
		this.returnCode = returnCode;
	}

	/**
	 * @return the returnMsg
	 */
	public String getReturnMsg() {
		return returnMsg;
	}

	/**
	 * @param returnMsg the returnMsg to set
	 */
	public void setReturnMsg(String returnMsg) {
		this.returnMsg = returnMsg;
	}

	/**
	 * @return the appId
	 */
	public String getAppId() {
		return appId;
	}

	/**
	 * @param appId the appId to set
	 */
	public void setAppId(String appId) {
		this.appId = appId;
	}

	/**
	 * @return the mchId
	 */
	public String getMchId() {
		return mchId;
	}

	/**
	 * @param mchId the mchId to set
	 */
	public void setMchId(String mchId) {
		this.mchId = mchId;
	}

	/**
	 * @return the subAppId
	 */
	public String getSubAppId() {
		return subAppId;
	}

	/**
	 * @param subAppId the subAppId to set
	 */
	public void setSubAppId(String subAppId) {
		this.subAppId = subAppId;
	}

	/**
	 * @return the subMchId
	 */
	public String getSubMchId() {
		return subMchId;
	}

	/**
	 * @param subMchId the subMchId to set
	 */
	public void setSubMchId(String subMchId) {
		this.subMchId = subMchId;
	}

	/**
	 * @return the deviceInfo
	 */
	public String getDeviceInfo() {
		return deviceInfo;
	}

	/**
	 * @param deviceInfo the deviceInfo to set
	 */
	public void setDeviceInfo(String deviceInfo) {
		this.deviceInfo = deviceInfo;
	}

	/**
	 * @return the nonceStr
	 */
	public String getNonceStr() {
		return nonceStr;
	}

	/**
	 * @param nonceStr the nonceStr to set
	 */
	public void setNonceStr(String nonceStr) {
		this.nonceStr = nonceStr;
	}

	/**
	 * @return the sign
	 */
	public String getSign() {
		return sign;
	}

	/**
	 * @param sign the sign to set
	 */
	public void setSign(String sign) {
		this.sign = sign;
	}

	/**
	 * @return the resultCode
	 */
	public String getResultCode() {
		return resultCode;
	}

	/**
	 * @param resultCode the resultCode to set
	 */
	public void setResultCode(String resultCode) {
		this.resultCode = resultCode;
	}

	/**
	 * @return the errCode
	 */
	public String getErrCode() {
		return errCode;
	}

	/**
	 * @param errCode the errCode to set
	 */
	public void setErrCode(String errCode) {
		this.errCode = errCode;
	}

	/**
	 * @return the errCodeDes
	 */
	public String getErrCodeDes() {
		return errCodeDes;
	}

	/**
	 * @param errCodeDes the errCodeDes to set
	 */
	public void setErrCodeDes(String errCodeDes) {
		this.errCodeDes = errCodeDes;
	}

	/**
	 * @return the tradeType
	 */
	public String getTradeType() {
		return tradeType;
	}

	/**
	 * @param tradeType the tradeType to set
	 */
	public void setTradeType(String tradeType) {
		this.tradeType = tradeType;
	}

	/**
	 * @return the prepayId
	 */
	public String getPrepayId() {
		return prepayId;
	}

	/**
	 * @param prepayId the prepayId to set
	 */
	public void setPrepayId(String prepayId) {
		this.prepayId = prepayId;
	}

	/**
	 * @return the codeUrl
	 */
	public String getCodeUrl() {
		return codeUrl;
	}

	/**
	 * @param codeUrl the codeUrl to set
	 */
	public void setCodeUrl(String codeUrl) {
		this.codeUrl = codeUrl;
	}
}
